package com.yhgm.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.yhgm.model.entity.AnyConstant;
import com.yhgm.service.impl.AnyConstantServiceImpl;
import com.yhgm.utils.R;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("anyConstant")
public class AnyConstantController {
    @Resource
    private AnyConstantServiceImpl anyConstantService;
    @SaCheckPermission("variable.query")
    @GetMapping("getList")
    public R getList() {
        return anyConstantService.getList();
    }
    @SaCheckPermission("variable.query")
    @GetMapping("getAuthorityValue")
    public R getAuthorityValue(Long id) {
        return anyConstantService.getAuthorityValue(id);
    }
    @SaCheckPermission("variable.update")
    @PutMapping("updateOne")
    public R updateOne(@RequestBody AnyConstant anyConstant) {
        return anyConstantService.updateOne(anyConstant);
    }
}
